<?php
/********************************************************
** Copyright 2010-2013. Todos los derechos reservados. **
** Desarrollado y Gestionado por:					   **
** Sugey Quintero (Analista)						   **
** José G. De Freitas (Programador)					   **
** Klaudia Uribe (Diseñadora Web)					   **
** Cesar Isturiz (Diseñador Web)					   **
**				S E A  v1.0							   **
*********************************************************/

session_start();
include("conexion2.php");

	if (isset($_SESSION['name']) and isset($_SESSION['tiempo'])) {
        include("Tiempo.php");
	date_default_timezone_set('America/Caracas'); setlocale(LC_TIME, 'spanish');
	$usuario = $_SESSION['name'];
	$fecha = date("Y-m-d H:i:s");
	$auditoria = mysql_query("INSERT INTO auditoria SELECT '$usuario', '$fecha' , 'Registro de hora de entrada de personal liceo' ");

    }else {
		echo "<script>alert('Debe ingresar al sistema primero');</script>";
		echo "<script>document.location.href='index.php';</script>";
	}
include("conexion.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Hora de Entrada del Profesor</title>
<link rel="shortcut icon" type="image/x-icon" href="../favicon.ico">
<link href="style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="js/funciones.js"></script>
<!-- calendario-->
<link rel="stylesheet" type="text/css" href="src/css/jscal2.css">
<link rel="stylesheet" type="text/css" href="src/css/border-radius.css">
<link rel="stylesheet" type="text/css" href="src/css/steel/steel.css">
<script type="text/javascript" src="src/js/jscal2.js"></script>
<script type="text/javascript" src="src/js/lang/es.js"></script>
<!-- fin calendario-->
<!-- botones-->
<link type="text/css" href="js/css/smoothness/jquery-ui-1.8.16.custom.css" rel="Stylesheet" />      
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script> 
<script>
var j$ = jQuery.noConflict();
j$(document).ready(function(){
j$(".button").button();
});

j$(function(){
	j$('#menu li a').click(function(event){
		var elem = j$(this).next();
		if(elem.is('ul')){
			event.preventDefault();
			j$('#menu ul:visible').not(elem).slideUp();
			elem.slideToggle();
		}
	});
});

function verifyInput(_selList,_textBox,pos) {
	document.getElementById('Cedula').readOnly = false;
	var SI = eval(_selList+".selectedIndex");
	var SV = eval(_selList+".options[SI].value");
	eval(_textBox+".value = SV");
	var a = eval(_selList+".options.selectedIndex=0");
	if (pos=='0'){
		document.FormBuscador.Cedula.focus();
	}
}
</script>
</head>

<body>
<div id="wrap">
<div id="header">
<div id="hora">
<?php include("Hora.php"); ?>
</div>
<div id="topnav">
	<?php include("MenuSuperior.php"); ?>
</div>

</div>
<div id="content">
<div id="left">
<div class="post">
<div class="post_h">

</div>

<div class="postcontent">
<blockquote><h2 align="center">HORA DE ENTRADA DEL PROFESOR</h2></blockquote>
<fieldset>
<form action="#" method="#" id="FormBuscador" name="FormBuscador">
	<legend align=left><b><font size=2>BUSCADOR</font></b></legend>	
		<table width=100% cellspacing=3 cellpadding=0 border=0>
			<tr>
				<td align=center>C&eacute;dula: <select name='Nac_p' onchange="verifyInput('document.FormBuscador.Nac_p','document.FormBuscador.Cedula','0')"><option></option><option value='V-'>V-</option><option value='E-'>E-</option></select><input name='Cedula' id='Cedula' onKeyPress='return acceptNum(event)' size=8 maxlength=10 readonly>
				<input class=button type=button value=Buscar onClick="javascript: if(document.getElementById('Cedula').value==''){ alert('Introduzca una c&eacute;dula'); } else { buscar_datos(document.getElementById('Cedula').value,''); }"></td>
			</tr>
			<tr>
				<td align=center><div id="datos"></div></td>
			</tr>
		</table>
</form>
</fieldset>

<div class="post">
<span></span></div>

<form action="ResAsistenciaPersonal.php" method="POST" name="AsistenciaPersonal" id="AsistenciaPersonal">
		<fieldset>
			<legend align=left><b><font size=2>ASISTENCIA</font></b></legend>
			<p align=center><?php date_default_timezone_set('America/Caracas'); setlocale(LC_TIME, 'spanish'); echo ucwords(strtoupper(strftime("%A, %d de %B de %Y"))); ?></p>
				<div id="datos_mostrar"></div>
			</fieldset>

<div class="post">
<span></span></div>

<div name=botonera align=center>
	<input class=button type=button value=Volver onClick="location='AsistenciaPersonal.php'">
</div>
</form>
</div>
<div class="post_b">
<span></span></div>
</div>


</div>

<div class="post">
<div class="post_h">

</div>


</div>

<?php include("Menu.php"); ?>

<div class="clear"></div>
</div>
<div id="pagebottom"></div>

<div id="footer">
<P>&reg; Derechos Reservados @ CopyRight. 2011-2012</P>
<p>Programadores: Quintero E, Isturiz C, Uribe C, De Freitas J.</p>
</div>
</div>
</body>
</html>
